/**
 * 
 */
package com.eagle.coders.security.transaction.beans;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;


@Entity
//@NamedQueries( {
//    @NamedQuery(name = "UserGroupLimit.findGroupLimitsByUserId", 
//            query = "select object(o) from UserGroupLimit o where o.groupCode=:groupCode and o.groupLevel=:groupLevel") })
@Table(name="SY98SEC_GRP_LMT")
@IdClass(UserGroupLimitPK.class)
public class UserGroupLimit implements Serializable { 
//extends BaseDomainObject implements Serializable{
    
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String groupCode;
    
    private Integer groupLevel;
    
    private String moduleCode;
    
    private String currencyCode;
    
//    private Integer cashDebit;
//    
//    private Integer cashCredit;
//    
//    private Integer chequeDebit;
//    
//    private Integer chequeCredit;
//    
//    private Integer transferDebit;
//    
//    private Integer transferCredit;
//    
//    private Integer journalDebit;
//    
//    private Integer journalCredit;
    
    private BigDecimal cashDebit;
    
    private BigDecimal cashCredit;
    
    private BigDecimal chequeDebit;
    
    private BigDecimal chequeCredit;
    
    private BigDecimal transferDebit;
    
    private BigDecimal transferCredit;
    
    private BigDecimal journalDebit;
    
    private BigDecimal journalCredit;
    
    private Date festDateBegin;
    
    private Date festDateEnd;
    
    private BigDecimal varAmount;
    
//    private GroupLevel groupLvl;

    @Id
    @Column(name = "FCCD", nullable = false, insertable = false, updatable = false)
    public String getCurrencyCode() {
        return currencyCode;
    }

    public void setCurrencyCode(String currencyCode) {
        this.currencyCode = currencyCode;
    }
    
    @Id
    @Column(name = "GRP_CD", nullable = false, insertable = false, updatable = false)
    public String getGroupCode() {
        return groupCode;
    }

    public void setGroupCode(String groupCode) {
        this.groupCode = groupCode;
    }
    
    @Id
    @Column(name = "GRP_LVL", nullable = false, insertable = false, updatable = false)
    public Integer getGroupLevel() {
        return groupLevel;
    }

    public void setGroupLevel(Integer groupLevel) {
        this.groupLevel = groupLevel;
    }
    
    @Id
    @Column(name = "MOD_CD", nullable = false, insertable = false, updatable = false)
    public String getModuleCode() {
        return moduleCode;
    }
    
    public void setModuleCode(String moduleCode) {
        this.moduleCode = moduleCode;
    }
    
//    @Column(name="CSH_CR")
//    public Integer getCashCredit() {
//        return cashCredit;
//    }
//
//    public void setCashCredit(Integer cashCredit) {
//        this.cashCredit = cashCredit;
//    }
//    
//    @Column(name="CSH_DR")
//    public Integer getCashDebit() {
//        return cashDebit;
//    }
//
//    public void setCashDebit(Integer cashDebit) {
//        this.cashDebit = cashDebit;
//    }
//    
//    @Column(name="CHQ_CR")
//    public Integer getChequeCredit() {
//        return chequeCredit;
//    }
//
//    public void setChequeCredit(Integer chequeCredit) {
//        this.chequeCredit = chequeCredit;
//    }
//    
//    @Column(name="CHQ_DR")
//    public Integer getChequeDebit() {
//        return chequeDebit;
//    }
//
//    public void setChequeDebit(Integer chequeDebit) {
//        this.chequeDebit = chequeDebit;
//    }
//    
//    @Column(name="JNL_CR")
//    public Integer getJournalCredit() {
//        return journalCredit;
//    }
//
//    public void setJournalCredit(Integer journalCredit) {
//        this.journalCredit = journalCredit;
//    }
//    
//    @Column(name="JNL_DR")
//    public Integer getJournalDebit() {
//        return journalDebit;
//    }
//
//    public void setJournalDebit(Integer journalDebit) {
//        this.journalDebit = journalDebit;
//    }
//    
//    @Column(name="TRF_CR")
//    public Integer getTransferCredit() {
//        return transferCredit;
//    }
//
//    public void setTransferCredit(Integer tradeFinanceCredit) {
//        this.transferCredit = tradeFinanceCredit;
//    }
//    
//    @Column(name="TRF_DR")
//    public Integer getTransferDebit() {
//        return transferDebit;
//    }
//
//    public void setTransferDebit(Integer tradeFinanceDebit) {
//        this.transferDebit = tradeFinanceDebit;
//    }
    
    @Column(name="CSH_CR")
    public BigDecimal getCashCredit() {
        return cashCredit;
    }

    public void setCashCredit(BigDecimal cashCredit) {
        this.cashCredit = cashCredit;
    }
    
    @Column(name="CSH_DR")
    public BigDecimal getCashDebit() {
        return cashDebit;
    }

    public void setCashDebit(BigDecimal cashDebit) {
        this.cashDebit = cashDebit;
    }
    
    @Column(name="CHQ_CR")
    public BigDecimal getChequeCredit() {
        return chequeCredit;
    }

    public void setChequeCredit(BigDecimal chequeCredit) {
        this.chequeCredit = chequeCredit;
    }
    
    @Column(name="CHQ_DR")
    public BigDecimal getChequeDebit() {
        return chequeDebit;
    }

    public void setChequeDebit(BigDecimal chequeDebit) {
        this.chequeDebit = chequeDebit;
    }
    
    @Column(name="JNL_CR")
    public BigDecimal getJournalCredit() {
        return journalCredit;
    }

    public void setJournalCredit(BigDecimal journalCredit) {
        this.journalCredit = journalCredit;
    }
    
    @Column(name="JNL_DR")
    public BigDecimal getJournalDebit() {
        return journalDebit;
    }

    public void setJournalDebit(BigDecimal journalDebit) {
        this.journalDebit = journalDebit;
    }
    
    @Column(name="TRF_CR")
    public BigDecimal getTransferCredit() {
        return transferCredit;
    }

    public void setTransferCredit(BigDecimal tradeFinanceCredit) {
        this.transferCredit = tradeFinanceCredit;
    }
    
    @Column(name="TRF_DR")
    public BigDecimal getTransferDebit() {
        return transferDebit;
    }

    public void setTransferDebit(BigDecimal tradeFinanceDebit) {
        this.transferDebit = tradeFinanceDebit;
    }
    
    @Column(name="FEST_BEG_DT")
    public Date getFestDateBegin() {
        return festDateBegin;
    }

    public void setFestDateBegin(Date festDateBegin) {
        this.festDateBegin = festDateBegin;
    }
    
    @Column(name="FEST_END_DT")
    public Date getFestDateEnd() {
        return festDateEnd;
    }

    public void setFestDateEnd(Date festDateEnd) {
        this.festDateEnd = festDateEnd;
    }
    
    @Column(name="FEST_LMT_VAR")
    public BigDecimal getVarAmount() {
        return varAmount;
    }

    public void setVarAmount(BigDecimal varAmount) {
        this.varAmount = varAmount;
    }
    
    
//TODOD: ======== Need to change this structure for Role and their level with respect
//       ======== to user
//    @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
//    @JoinColumns({
//    @JoinColumn(name = "GRP_CD", referencedColumnName="GRP_CD",nullable = false, insertable = false, updatable = false),
//    @JoinColumn(name="GRP_LVL",referencedColumnName="GRP_LVL",nullable = false, insertable = false, updatable = false)
//    })
//    public GroupLevel getGroupLvl() {
//        return groupLvl;
//    }
//
//    public void setGroupLvl(GroupLevel groupLvl) {
//        this.groupLvl = groupLvl;
//    }
    
}
